// [138, 20, 37, 31]
function reverse(arr) {
    let preSum = 0
    let max = Number.MIN_SAFE_INTEGER, min = Number.MAX_SAFE_INTEGER
    const map = new Map()
    for(let i = 0; i < arr.length; i++) {
        arr[i] = '' + arr[i]
    }
    for(let i = 0; i < arr.length; i++) {
        preSum += parseInt(arr[i])
        map.set(i, preSum)
    }
}